limsEquiptFileAcq.editPage = {

    getGridParam : function() {
        var _this = this;
        return {
            type : 'grid',
            id : 'lims-equipt-file-acq-edit-list-grid',
            url : limsEquiptFileAcq.baseUrl + '/queries/raw',
            service : 'limsEquiptFileAcqServiceImpl',
            dbTable : 'T_LIMS_EQUIPT_FILE_ACQ',
            columns : limsEquiptFileAcq.getEditListColumns(),
            toolbar : [ {
                type : 'button',
                text : 'GIKAM.BUTTON.INSERT',
                icon : 'add',
                onClick : function() {
                    Gikam.preInsert({
                        modalTitle : 'BASEMODULE.TRM.EQUIPT.EQUIPTFILEACQS.MODAL.ADD',
                        fields : limsEquiptFileAcq.getBaseInfoFormFields(),
                        url : limsEquiptFileAcq.baseUrl
                    }).done(function(id) {
                        Gikam.getComp('lims-equipt-file-acq-edit-list-grid').refresh();
                    });
                }
            }, {
                type : 'button',
                text : 'GIKAM.BUTTON.DELETE',
                icon : 'remove-row',
                onClick : function() {
                    Gikam.getComp('lims-equipt-file-acq-edit-list-grid').deleteRows(limsEquiptFileAcq.baseUrl);
                }
            } ]
        }
    },

    loadDetailPage : function(id) {
        workspace.window.load(limsEquiptFileAcq.baseUrl + '/page/detail' + Gikam.param({
            id : id
        }));
    },

    create : function() {
        var _this = this;
        Gikam.create('layout', {
            id : 'lims-equipt-file-acq-edit-list-layout',
            renderTo : workspace.window.$dom,
            center : {
                items : [ this.getGridParam() ]
            }
        });
    },

    init : function() {
        this.create();
    }
};
